package com.gt;

import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import java.io.IOException;

@SpringBootApplication(exclude = DruidDataSourceAutoConfigure.class)
@MapperScan("com.gt.**.mapper")
@EnableTransactionManagement
@EnableAsync//异步线程
//@ServletComponentScan
public class ApiServiceApplication extends SpringBootServletInitializer {

    private static Logger logger = LoggerFactory.getLogger(ApiServiceApplication.class);

    public static void main(String[] args) {
        SpringApplication.run(ApiServiceApplication.class, args);
        logger.info("service服务端启动成功！！！");
        try {
            System.in.read();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }



}
